package com.xujl.fastlib.base;

import android.view.View;

import androidx.annotation.IntDef;

/**
 * 状态布局抽象
 */
public interface IStateLayout {
    int TYPE_LOADING = 0;
    int TYPE_EMPTY = 1;
    int TYPE_ERROR = 2;
    int TYPE_SUCCESS = 3;

    void showState (@StateType int type);

    IStateLayout setStateView (@StateType int type, View view);

    IStateLayout setStateListener (@StateType int type, View.OnClickListener listener);

    @IntDef({TYPE_LOADING, TYPE_EMPTY, TYPE_ERROR, TYPE_SUCCESS})
    @interface StateType {

    }
}
